	.file "div.s"
	
	.global g_a
	.global	g_b
	.section .data
g_a:
	.quad	355000000
g_b:
	.quad	113

	.section .rodata
.LC0:
	.string "%ld / %ld = %ld, %ld %% %ld = %ld\n"

	.section .text
	.global main
	.type main, @function
main:
	pushq %rbp
	movq %rsp, %rbp

	movq g_a(%rip), %rax
	cqo

	divq g_b(%rip)

	movq %rax, %r10
	movq %rdx, %r11

	leaq .LC0(%rip), %rdi
	movq g_a(%rip), %rsi
	movq g_b(%rip), %rdx
	movq %r10, %rcx

	movq %rsi, %r8
	movq %rdx, %r9

	//caution: we must ensure that the RSP is 16-byte align!!!!
	subq $8, %rsp
	pushq %r11

	call printf@PLT

	leaveq
	retq
